
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- Standard Meta -->
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

<title>投票系统</title>
<link rel="stylesheet" href="{RES}vote/css/style.css" type="text/css">
<link rel="stylesheet" href="{RES}files/css/semantic.min.css" type="text/css">
<script type="text/javascript" src="{RES}files/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="{RES}files/js/semantic.min.js"></script>
<script type="text/javascript" src="{RES}js/vote.js"></script>
<script type="text/javascript"> 
 function check(){
   var id = $('input:radio:checked').val();
   
	
	 
     if("undefined" == typeof id){
      alert('请选择您最满意的一项！');
	  return false;
   }
   return true;
 }
</script> 
</head>
<body id='vote'>

<div class="main container">
<div class="ui page grid">
<div class="column">

		<h2 class="ui top attached green segment votehead">
		   {$ridwall['votetitle']}
				</h2>
		<div class="ui attached segment content">
		<form method='post' onsubmit="return check();">
		<input name="openid" value="{$openid}" hidden />
		   {if $member['vote']==0}
		   {loop $allvote $key $row}
				<div class="select">
				 <div class="ui ribbon {$class[$key]} label">
					{$row['name']}
					</div>
					
					<div class="ui grid">
						<div class = "two wide column"><a class="ui {$class[$key]} label"><?php echo $num = $key+1;?></a></div>
						<div class="ui {$class[$key]} progress thirteen wide column">
							
							<div class="bar"  style="width: {$persent[$row['id']]}%;"><div class="voteright" >{$persent[$row['id']]}%({$row['res']}票)</div></div>
						</div>
						<div class = "one wide column"><input type="radio" value="{$row['id']}" class="ui radio checkbox votecheck" name="voteid" id="voteid"/></div>
					</div>
				</div>
				{/loop}
            {else}
                {loop $allvote $key $row}
				<div class="select">
				 <div class="ui ribbon {$class[$key]} label">
					
					{$row['name']}{if $member['vote']==$row['id']}【您已投此项】{/if}
					
					
					</div>
					
					<div class="ui grid">
						<div class = "two wide column"><a class="ui {$class[$key]} label"><?php echo $num = $key+1;?></a></div>
						<div class="ui {$class[$key]} progress fourteen wide column">
							
							<div class="bar"  style="width: {$persent[$row['id']]}%;"><div class="voteright" style="right: 5%;">{$persent[$row['id']]}%({$row['res']}票)</div></div>
						</div>
					</div>
				</div>
				{/loop}
         {/if}


		</div>
		
				{if empty($member['vote'])}

				<button class="fluid ui  bottom attached green button" type="submit">投&nbsp;&nbsp;&nbsp;&nbsp;票</button></form>
				{else}
				</form><button id="closewindow" class="fluid ui  bottom attached red button" onclick="WeixinJSBridge.call('closeWindow');">关闭本页面</button>
				{/if}
				
				
		
	</div>


</div>

		<small class="footer">
			<center>
			 {$ridwall['votepower']}
			  </center>
		</small>
 </div>
</body>
</html>
